package com.dyna.digit.flowable.domain.vo;

import com.dyna.constants.DateFatter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author zhoucaiwang
 * @date 2023/12/5
 */

@Data
public class FlowHistoryVo {

    @ApiModelProperty(value = "历史任务id")
    private String id;

    @ApiModelProperty(value = "流程实例id")
    private String processInstanceId;

    @ApiModelProperty(value = "流程定义id")
    private String processDefinitionId;

    @ApiModelProperty(value = "事件名称")
    private String name;

    @ApiModelProperty(value = "事件描述")
    private String description;

    @ApiModelProperty(value = "任务创建时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private Date createTime;

    @ApiModelProperty(value = "任务结束时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private Date endTime;

    @ApiModelProperty(value = "上一次更新时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private Date lastUpdateTime;

    @ApiModelProperty(value = "历史变量信息")
    private HistoryVariables historyVariables;

    @Data
    @ApiModel(value = "历史变量信息")
    public static class HistoryVariables {

        @ApiModelProperty(value = "项目id")
        private Integer projectId;

        @ApiModelProperty(value = "项目名称")
        private String projectName;

        @ApiModelProperty(value = "结果")
        private Integer status;

        @ApiModelProperty(value = "流程状态")
        private Integer flowStatus;

        @ApiModelProperty(value = "是否跳过")
        private Boolean skip;

    }

}
